home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / pc / software / kommunik / multimed / snakcarb.sit / Snak 4.6.3 Carbon / Scripts / CTCPCatcher < prev    next >
Text File  |  2000-04-20  |  2KB  |  50 lines

  1. # lines with '#' are comments that are not executed
  2.  
  3. # This file contains examples of how to add additional functionality to Snak. 
  4. # The examples respond to new CTCP requests or changes the way existing 
  5. # requests are handled.
  6.  
  7. # To automatically load this into a connection, add "/load ctcpcatcher" to the startup actions.
  8.  
  9. # This method can add additional processing of existing CTCP functions
  10. # Snaks existing CTCP processing will still happen
  11.  
  12. on ^ctcp "% % CLIENTINFO *" {
  13.     echo *** $0 requests your CLIENTINFO
  14. }
  15.  
  16.  
  17. # this method can als add new CTCP selectors like PAGE. Your processing of Beeps 
  18. # must be set on in the preferences, or the beeps will be silent
  19.  
  20. # the '^' in front of ctcp makes Snak stop processing of the message after the handler 
  21. # has executed. If this was '-' or missing then Snak would try and do PAGE as well 
  22. # but this would give an error message
  23.  
  24. on ^ctcp "% % PAGE" {
  25.     echo *** --------------------------------------
  26.     echo *** * CTCP PAGE received from $[10]0 *
  27.     echo *** --------------------------------------
  28. }
  29.  
  30.  
  31. # the raw_irc method a way to be the very first that accesses incoming data
  32. # it is only way that can block the existing processing of CTCP requests by swallowing 
  33. # the data before any other parts of Snak acts on it
  34.  
  35. # This script uses the $nickonly function from the Basical script file.
  36. # The function splits the nick!userhost string and returns the nick.
  37.  
  38. # Input:
  39. # $0 : nick!userhost
  40.  
  41. ^on ^raw_irc "% PRIVMSG % :**VERSION**" {
  42.     echo *** $0 requested your client version
  43.     quote NOTICE $nickonly($0) :VERSION A really good IRC client
  44. }
  45.  
  46. # emits three beeps. Can be added to a script snippet so you can hear that it executed
  47. alias beeper {
  48.     echo  something happened
  49. }
  50.